#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

void look_up(char* a)
{
	char* p;
	int Letter = 0;
	int letter = 0;
	int blank = 0;
	int digit = 0;
	int other = 0;
	for (p = a; *p != '\0'; p++)
	{
		if (*p >= 'a' && *p <= 'z')
			Letter++;
		else if (*p >= 'A' && *p < +'Z')
			letter++;
		else if (*p == ' ')
			blank++;
		else if (*p >= '0' && *p <= '9')
			digit++;
		else
			other++;
	}
	printf("%d %d %d %d %d\n", Letter, letter, blank, digit, other);
}
int main()
{
	char a[] = { 0 };
	gets(a);
	look_up(a);

	return 0;
}
void into(int* a)
{
	int i = 0;
	int j = 0;
	int t = 0;
	for(i=0;i<3;i++)
		for (j = i; j < 3; j++)
		{
			t = *(a + 3 * i + j);
			*(a + 3 * i + j) = *(a + 3 * j + i);
			*(a + 3 * j + i) = t;
		}
	for (i = 0; i < 9; i++)
	{
		printf("%d ", *(a + i));
		if ((i+1) % 3 == 0)
			printf("\n");
		//printf("%d ", *(a + i));
	}
}
int main()
{
	int a[][3] = { 1,2,3,4,5,6,7,8,9 };
	into(a);
	
	return 0;
}